<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>变量的作用范围</title>
	<script>

		// 全局变量
		num =999;

		// 参数局部变量
		function run(num) {
			var b =100;
			document.write(num);
		}


		run(1000);

		document.write(b);

		



	</script>
</head>
<body>
	
</body>
</html>